﻿using System.Collections.Generic;
using UnityEngine;
using UnityEditor;


/// <summary>
/// 
/// </summary>
public class XEditorToggleProperty
{
    /// <summary>
    /// 
    /// </summary>
    public bool state;
        
    /// <summary>
    /// 
    /// </summary>
    public GUIContent content;

    /// <summary>
    /// 
    /// </summary>
    public BuildAssetBundleOptions option;

    /// <summary>
    /// 
    /// </summary>
    public string text;

    /// <summary>
    /// 
    /// </summary>
    /// <param name="s"></param>
    /// <param name="title"></param>
    /// <param name="tooltip"></param>
    /// <param name="onToggles"></param>
    /// <param name="reserve"></param>
    /// <param name="opt"></param>
    public XEditorToggleProperty(bool s,
        string title,
        string tooltip,
        List<string> onToggles,
        string reserve = "",
        BuildAssetBundleOptions opt = BuildAssetBundleOptions.None)
    {
        if (onToggles.Contains(title))
            state = true;
        else
            state = s;

        content = new GUIContent(title, tooltip);
        option = opt;
        text = reserve;
    }
}
